import React, { PureComponent } from 'react';
import { Card, List,Table,Tag } from 'antd';

class advice extends PureComponent {


   
    render() {
        const weatherData = [
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "17",
                "humidity": "57",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "999",
                "qpf": "0.0",
                "realFeel": "27",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "6",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "18",
                "humidity": "60",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "999",
                "qpf": "0.0",
                "realFeel": "26",
                "snow": "0",
                "temp": "27",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "8",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "19",
                "humidity": "63",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "999",
                "qpf": "0.0",
                "realFeel": "25",
                "snow": "0",
                "temp": "25",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "10",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "20",
                "humidity": "66",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1000",
                "qpf": "0.0",
                "realFeel": "25",
                "snow": "0",
                "temp": "23",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "12",
                "windlevel": "3"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "21",
                "humidity": "68",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1000",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "11",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "22",
                "humidity": "69",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1001",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "10",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-10",
                "hour": "23",
                "humidity": "69",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "9",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "0",
                "humidity": "70",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "8",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "1",
                "humidity": "71",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "23",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "7",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "2",
                "humidity": "76",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "22",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "7",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "3",
                "humidity": "77",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "21",
                "snow": "0",
                "temp": "21",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "6",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "4",
                "humidity": "78",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1003",
                "qpf": "0.0",
                "realFeel": "21",
                "snow": "0",
                "temp": "21",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "90",
                "windDir": "E",
                "windSpeed": "5",
                "windlevel": "2"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "5",
                "humidity": "84",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1003",
                "qpf": "0.0",
                "realFeel": "20",
                "snow": "0",
                "temp": "22",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "90",
                "windDir": "E",
                "windSpeed": "5",
                "windlevel": "1"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "6",
                "humidity": "80",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1003",
                "qpf": "0.0",
                "realFeel": "22",
                "snow": "0",
                "temp": "23",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "90",
                "windDir": "E",
                "windSpeed": "5",
                "windlevel": "1"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "7",
                "humidity": "75",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "24",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "1",
                "windDegrees": "90",
                "windDir": "E",
                "windSpeed": "5",
                "windlevel": "1"
            },
            {
                "condition": "阴",
                "conditionId": "13",
                "date": "2019-07-11",
                "hour": "8",
                "humidity": "68",
                "iconDay": "2",
                "iconNight": "2",
                "pop": "40",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "24",
                "snow": "0",
                "temp": "25",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "2",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "5",
                "windlevel": "2"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "9",
                "humidity": "63",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "26",
                "snow": "0",
                "temp": "27",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "4",
                "windDegrees": "135",
                "windDir": "ESE",
                "windSpeed": "5",
                "windlevel": "1"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "10",
                "humidity": "57",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "28",
                "snow": "0",
                "temp": "28",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "6",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "4",
                "windlevel": "1"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "11",
                "humidity": "54",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "1002",
                "qpf": "0.0",
                "realFeel": "28",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "8",
                "windDegrees": "135",
                "windDir": "SE",
                "windSpeed": "4",
                "windlevel": "1"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "12",
                "humidity": "51",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "1001",
                "qpf": "0.0",
                "realFeel": "29",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "8",
                "windDegrees": "135",
                "windDir": "SSE",
                "windSpeed": "5",
                "windlevel": "1"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "13",
                "humidity": "48",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "1000",
                "qpf": "0.0",
                "realFeel": "29",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "8",
                "windDegrees": "135",
                "windDir": "SSE",
                "windSpeed": "6",
                "windlevel": "2"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "14",
                "humidity": "49",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "0",
                "pressure": "999",
                "qpf": "0.0",
                "realFeel": "31",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "7",
                "windDegrees": "135",
                "windDir": "SSE",
                "windSpeed": "7",
                "windlevel": "2"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "15",
                "humidity": "50",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "998",
                "qpf": "0.0",
                "realFeel": "30",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "5",
                "windDegrees": "180",
                "windDir": "S",
                "windSpeed": "8",
                "windlevel": "2"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "16",
                "humidity": "50",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "998",
                "qpf": "0.0",
                "realFeel": "30",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "3",
                "windDegrees": "180",
                "windDir": "S",
                "windSpeed": "9",
                "windlevel": "2"
            },
            {
                "condition": "晴",
                "conditionId": "1",
                "date": "2019-07-11",
                "hour": "17",
                "humidity": "44",
                "iconDay": "0",
                "iconNight": "30",
                "pop": "10",
                "pressure": "998",
                "qpf": "0.0",
                "realFeel": "29",
                "snow": "0",
                "temp": "29",
                "updatetime": "2019-07-10 17:03:39",
                "uvi": "2",
                "windDegrees": "180",
                "windDir": "S",
                "windSpeed": "9",
                "windlevel": "2"
            }
        ];


        const columns = [
            { title: "时间", key: "time", dataIndex: "time" , render: (text, record) => (
                `${record.hour}:00`
                                )},
            { title: "负荷", key: "time", dataIndex: "time" , render: (text, record) => (
                                    `2000kW`
                                                    )},
            { title: "设备1", key: "data1", dataIndex: "data1",
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                )
                             },
            { title: "设备2", key: "data2", dataIndex: "data2",
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                ) },
            { title: "设备3", key: "data3", dataIndex: "data3",
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                ) },
            { title: "设备4", key: "data4", dataIndex: "data4" ,
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                )},
            { title: "设备5", key: "data5", dataIndex: "data5" ,
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                )},
            { title: "设备5", key: "data6", dataIndex: "data6",
            render: (text, record) => (
                <span>
                <Tag color="#13C2C2">状态：开启</Tag>
                <Tag color="#3498DB">冷水温度：9.5 °</Tag>
                <Tag color="#3498DB"> 冷却水温度：27.5 °</Tag>
                </span>
                                ) },
          ];

        return (
            <Table columns={columns} size="small"  dataSource={weatherData} rowKey="code" 
            pagination={{defaultPageSize:3}}/>         
        );
    }
}

export default advice;
